import { favor } from "@/Api/favor.js";
const state = {
  favorlist: [],
};
const mutations = {
  SET_FAVOR_LIST(state, list) {
	console.log(list)
    state.favorlist = list;
  },
};
const actions = {
  async GetFavorList({ commit }) {
    let result = await favor();
	console.log(result)
    if (result.data.status == 200) {
      commit("SET_FAVOR_LIST", result.data.data);
    }
  },
};
const getters = {
  getFavor(state) {
    return state.favorlist;
  },
};
export default {
  state,
  mutations,
  actions,
  getters,
};
